<?php
namespace Mouta\UserBundle\Controller;

use FOS\UserBundle\Controller\SecurityController as BaseController;

class SecurityController extends BaseController
{
    /**
     * Renders the login template with the given parameters. Overwrite this function in
     * an extended controller to provide additional data for the login template.
     *
     * @param array $data
     *
     * @return \Symfony\Component\HttpFoundation\Response
     */
    protected function renderLogin(array $data)
    {
        $template = sprintf('FOSUserBundle:Security:login.html.%s', $this->container->getParameter('fos_user.template.engine'));
		
		$params = array('facet'=>'on','facet.field'=>'sexo');
		$result = $this->container->get('solr_manager')->find('*:*',0,0,$params);
		$data['data'] = $result;
		
		$seoPage = $this->container->get('sonata.seo.page');
		$seoPage
			->setTitle('Identificate')
			->addMeta('name', 'description', 'Ingresa en Amistate encontra amigos')
		;
		
        return $this->container->get('templating')->renderResponse($template, $data);
    }
}
